/*
 * FileName: SysLogDaoImpl.java
 *
 * Company: 
 * Copyright 2011-2012 (C) Ultrapower Software CO., LTD. All Rights Reserved.
 */
package com.jmeurope.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.jmeurope.dao.IbatisBaseDao;
import com.jmeurope.dao.SysLogDao;
import com.jmeurope.model.SysLog;

/**
 * <p>
 * Description: 
 * </p>
 *
 * @author wangwei  leo_java@163.com
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * Dec 26, 2011 12:22:10 PM          wangwei        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */

@Repository
public class SysLogDaoImpl extends IbatisBaseDao implements SysLogDao {

	@Override
	public void delete(Integer id) throws Exception {
		// TODO Auto-generated method stub
	}

	@Override
	public SysLog find(Integer id) throws Exception {
		return (SysLog)getSqlMapClientTemplate().getSqlMapClient().queryForObject("getLogById",id);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<SysLog> findAll() throws Exception {
		List<SysLog> logsList = getSqlMapClientTemplate().getSqlMapClient().queryForList("selectAllLogs");
		return logsList;
	}

	@Override
	public Integer insert(SysLog entity) throws Exception {
		return (Integer)getSqlMapClientTemplate().insert("insertLog", entity);
	}

	@Override
	public void update(SysLog entity) throws Exception {
		// TODO Auto-generated method stub

	}

}
